feat: Implement rebalance queue and config option - #2
Open
robertkotcher wants to merge 1 commit into
Open
Conversation
robertkotcher
force-pushed
the
semaphore-rebalance-queue
branch
5 times, most recently
from
October 26, 2022 15:09
76a5b32 to
f09992d
Compare
robertkotcher
force-pushed
the
semaphore-rebalance-queue
branch
9 times, most recently
from
November 7, 2022 20:11
66c8925 to
257d7c7
Compare
robertkotcher
commented
Nov 7, 2022
| reviewers: | ||
| - juliev0 | ||
| - tczhao | ||
| - xianlubird |
Author
There was a problem hiding this comment.
sorry, not sure how this got here.. trying to remove
robertkotcher
force-pushed
the
semaphore-rebalance-queue
branch
6 times, most recently
from
November 8, 2022 19:22
2e1e68e to
bfb748c
Compare
robertkotcher
force-pushed
the
semaphore-rebalance-queue
branch
2 times, most recently
from
November 15, 2022 21:13
24cf551 to
bac4b4b
Compare
robertkotcher
force-pushed
the
semaphore-rebalance-queue
branch
3 times, most recently
from
December 7, 2022 22:04
95ad542 to
13a9355
Compare
robertkotcher
force-pushed
the
semaphore-rebalance-queue
branch
3 times, most recently
from
December 16, 2022 18:29
ea7df7e to
892fa6d
Compare
robertkotcher
force-pushed
the
semaphore-rebalance-queue
branch
from
January 17, 2023 18:04
892fa6d to
b7d0422
Compare
robertkotcher
force-pushed
the
semaphore-rebalance-queue
branch
from
February 7, 2023 17:20
b7d0422 to
cd0b6f4
Compare
robertkotcher
force-pushed
the
semaphore-rebalance-queue
branch
from
February 23, 2023 10:16
cd0b6f4 to
32e4507
Compare
robertkotcher
force-pushed
the
semaphore-rebalance-queue
branch
5 times, most recently
from
April 4, 2023 20:31
10a201f to
e579537
Compare
Signed-off-by: Robert Kotcher <rkotcher+1@gmail.com>
robertkotcher
force-pushed
the
semaphore-rebalance-queue
branch
from
April 4, 2023 23:52
e579537 to
5422557
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context: In Argo, semaphores are implemented by wrapping Go's semaphore with some additional stuff. At the moment this "additional stuff" is mainly around prioritizing lock distribution to higher-priority workflows first. This can be seen in
semaphore.go, which shows how the priority queue is utilized intryAcquirebefore trying to acquire the lock using the more primitive semaphore.I also recommend checking out sync_manager to get a sense for how semaphores fit into the bigger Argo / Kubernetes picture.
This PR: I want to create a PR that is as low-touch as possible, so we can continue to rebase with Argo as long as possible with as little friction as possible. My approach is to create a new type of queue that can be dropped into
semaphore.go. This queue will have a new strategy: instead of being a plain old priority queue, we want the queue to distribute locks based on who is currently under-represented in the set of locks that are currently acquired.